package com.atguigu.edu.publisher.mapper;

import com.atguigu.edu.publisher.beans.TrafficVisitorTypeStatsBean;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TrafficVisitorStatsMapper {
    @Select("select \n" +
            "is_new,\n" +
            "sum(uv_ct) uv,\n" +
            "sum(pv_ct) pv,\n" +
            "sum(uj_ct) uj,\n" +
            "sum(sv_ct) sv,\n" +
            "sum(dur_sum) dur\n" +
            "from dws_traffic_vc_ch_ar_is_new_page_view_window\n" +
            "where toYYYYMMDD(stt) = #{date}\n" +
            "group by is_new;")
    List<TrafficVisitorTypeStatsBean> selectVisitorTypeStats(@Param("date")Integer date);
}
